"""shop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from goods import views

from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('spec', views.SpecView)

urlpatterns = [
  path('upload/', views.UploadView.as_view()),
  path('addbrand/', views.AddBrand.as_view()),
  path('getbrand/', views.GetBrand.as_view()),
  path('brandshow/<int:id>/', views.BrandShow.as_view()),
  path('skus/', views.SkuView.as_view()),
  path('addskus/', views.AddSku.as_view()),
  path('delskus/<int:id>/', views.DelSku.as_view()),
  path('skus/<int:id>/', views.GetSkuView.as_view()),
  path('updateskus/<int:id>/', views.UpdateSku.as_view()),
  path('spus/', views.SpuView.as_view()),
  path('brandall/', views.BrandAll.as_view()),
  path('spus/<int:id>/', views.GetSpuView.as_view()),
  path('delspus/<int:id>/', views.DelSpuView.as_view()),
  path('upspus/<int:id>/', views.UpSpuView.as_view()),
  path('catetwo/<int:id>/', views.CateTwo.as_view()),
  path('specall/', views.SpecAll.as_view()),
  path('option/', views.OptionView.as_view()),
  path('pic/', views.Pic.as_view()),
  path('option/<int:id>/', views.SpecOptionView.as_view()),
]

urlpatterns += router.urls